//
//  XDVideoCell.m
//  XDEducation
//
//  Created by apple on 2017/4/20.
//  Copyright © 2017年 apple. All rights reserved.
//

#import "XDVideoCell.h"
#import "XDVideoModel.h"
@interface XDVideoCell ()

//浏览量
@property (weak, nonatomic) IBOutlet UILabel *browseLabel;
//视频名称
@property (weak, nonatomic) IBOutlet UILabel *videoName;
//视频描述
@property (weak, nonatomic) IBOutlet UILabel *videoDesc;
//视频按钮
@property (weak, nonatomic) IBOutlet UIButton *videoBtn;

@end

@implementation XDVideoCell


-(void)setVideoModel:(XDVideoModel *)videoModel{

    self.browseLabel.text = videoModel.flowers;
    
    self.videoName.text = videoModel.title;
    NSString *desc = videoModel.videoDesc;
    
    if (desc.length == 0) {
        desc = @"无";
    }
    self.videoDesc.text = desc;
    
    [self.videoBtn sd_setBackgroundImageWithURL:[NSURL URLWithString:videoModel.absoluteImg] forState:UIControlStateNormal placeholderImage:[UIImage imageNamed:@"video_image_default"]];
}



- (IBAction)videoBtnClicked:(id)sender {
    
    if (self.videoBlock) {
        self.videoBlock();
    }
}


@end
